import { Component } from '@angular/core';
import { NzModalService } from 'ng-zorro-antd/modal';

@Component({
  selector: 'app-modal-service-demo',
  templateUrl: './modal-service-demo.component.html',
  styleUrl: './modal-service-demo.component.less',
})
export class ModalServiceDemoComponent {
  constructor(private _modalService: NzModalService) {}

  handleString() {
    this._modalService.create({
      nzTitle: 'Modal Title',
      nzContent: 'string, will close after 1 sec',
      nzOnOk: () => new Promise((resole) => setTimeout(resole, 1000)),
    });
  }
}
